

<script th:src="@{/js/jquery/jquery.form.js}"></script>

<script th:src="@{/bootstrap/js/bootstrap.js}"/>

<script th:src="@{/js/bootbox.min.js}"></script>

<script type="text/javascript" th:src="@{/bootstrap/bootstrap-validator/js/bootstrapValidator.js}"></script>

<script>
$(function(){
    (function($){
        $.fn.serializeJson=function(){
            var serializeObj={};
            var array=this.serializeArray();
            var str=this.serialize();
            $(array).each(function(){
                if(serializeObj[this.name]){
                    if($.isArray(serializeObj[this.name])){
                    serializeObj[this.name].push(this.value);
                    }else{
                    serializeObj[this.name]=[serializeObj[this.name],this.value];
                    }
                }else{
                    serializeObj[this.name]=this.value;
                }
            });
            return serializeObj;
        };
    })(jQuery);

});
</script>
